package liu.thread.thread.circulation;

public class thrS implements Runnable {

	private boolean flag=true;
	private Resource resource;
	
	
	
	public thrS(Resource resource) {
		super();
		this.resource = resource;
	}



	@Override
	public void run() {
		while(flag){
			try {
				 flag = resource.thrSub();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
	}

}
